In a number of market sectors such as medical applications samples are examined with a microscope and digital images are generated with a 2D digital camera attached to the microscope. This has a restriction of limited area of the sample viewed being captured with the digital camera. For a 40× objective a typical area is only 0.7 mm wide. Given that the active area on a microscope slide is 64×24 mm this is only a very small area of the possible sample area. One answer to this is to step and repeat otherwise known as macro dither over the whole of the sample area. A more preferred process is to use a line scan device similar to that described in U.S. Pat. No. 6,711,283 where long strips of data can be collected of 0.7 by 64 mm. Then adjacent strips can be scanned and the images butted together or stitched together as described in patent GB2206011.
As mentioned in U.S. Pat. No. 6,711,283 one problem with this long strip scanning is that the focus must be maintained over the whole length of the scan. As an example for a 40× lens with numerical aperture of 0.65 the depth of focus is around 1 micrometre. A typical microscope slide is not manufactured to hold this sort of tolerance and when mounted may flex due to the mounting method or under the force of gravity in excess of one micron. Also the sample being imaged may not itself be flat to 1 micrometre. In U.S. Pat. No. 6,711,283 this problem is addressed by separately building a focus map over the length of the scan and then adjusting the focus dynamically during scanning to fit the focus map. Unfortunately this is time consuming in building the focus map for each sample. A typical method of focusing is to scan the same area of the image at different focus levels and use a merit algorithm to determine the best focus. There are a number of merit algorithms used but an example is to take the sum of the squares of the differences between adjacent pixels. The merit algorithm produces a function, an example of which is shown in FIG. 1 where the peak (indicated by an arrow) is considered to be the point of focus.
Another method used to address this problem is to have multiple scans at different focus levels. This is called focus stacking or z stacking and is shown in FIG. 2. The idea is that at least one of the scan images is in focus at any one time and the stack of Z images 400 can be combined at a later date to give a single in focus image. Software for combining images can be obtained from a number of vendors. The problem with this method is that with small depth of focus in relation to the range of focus change in the sample, many layers of image will be needed to cover the full focus range and this will be time consuming. The line of best focus is shown at 401. At various positions 402, the images in the stack provide little useful information.
There is therefore a need to address these disadvantages.